﻿using System;

namespace 数组split
{
   
    class Program
    {

        
        static void Main(string[] args)
        {//数组
            string[] s = new string[3];
            string[] f = { "杨玉环", "貂蝉", "西施" };
            string[] y = new string[3] { "裴擒虎", "云中君", "百里玄策" };

            Console.WriteLine(s);
            Console.WriteLine(f);
            Console.WriteLine(y);

            //多维数组
            double[,] many = { { 98, 89 }, { 98.5, 89.5 }, { 95.5, 89 } };
            for (int i = 0; i < many.GetLength(0); i++)
            {
                Console.WriteLine("第" + (i + 1) + "个学生成绩：");
                for (int j = 0; j < many.GetLength(1); j++)
                {
                    Console.Write(many[i, j] + " ");
                }
                Console.WriteLine();

             //foreach
                double[] points = { 80, 88, 86, 90, 75.5 };
                double weight = 0;
                double height = 0;
                foreach (double point in points)
                {
                    weight = weight + point;
                }
                height = weight / points.Length;
                Console.WriteLine("总成绩为：" + weight);
                Console.WriteLine("平均成绩为：" + height);
                string[] chinese = { "45", "35" };
                string jj = "11";
                foreach (string ass in chinese)
                {
                    jj = jj + chinese;
                }
                Console.WriteLine(jj);

                string a = "jdfkleiovikd";
                

                string[] v = a.Split("f");
                foreach (var item in v)
                {
                    Console.WriteLine(item);
                }

               

            }
        }
    }
}
